package com.example.exp03.Service;


import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class ScheduledTasks {
        @Scheduled(cron = "0 0 1 * * *")
        public void fetchCoronaVirusData() throws IOException {
            Mapp.allCoronaVirusData = Mapp.getAllCoronaVirusData();
            System.out.println("数据更新成功");
        }
}
